<!--
/**
 * 开票管理 列表页 JS 脚本
 * @author 金杰 , maillank@qq.com
 * @since 2025-06-23 10:22:20
 */
 -->
 <!DOCTYPE html>
<html>

<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta charset="utf-8"/>
    <meta name="referrer" content="no-referrer">
    <title th:text="${lang.translate('开票管理')}">开票管理</title>
    <link th:if(theme.ico!="null") rel="shortcut icon" th:href="${theme.ico}" type="image/vnd.microsoft.icon">
    <link th:if(theme.ico!="null") rel="icon" th:href="${theme.ico}" type="image/vnd.microsoft.icon">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/assets/libs/layui/css/layui.css" th:href="'/assets/libs/layui/css/layui.css?'+${cacheKey}"/>
    <link rel="stylesheet" href="/assets/css/admin.css" th:href="'/assets/css/admin.css?'+${cacheKey}"/>
    <link rel="stylesheet" href="/assets/libs/toast/css/toast.css" type="text/css" th:href="'/assets/libs/toast/css/toast.css?'+${cacheKey}">
    <link rel="stylesheet" href="/assets/css/foxnic-web.css" th:href="'/assets/css/foxnic-web.css?'+${cacheKey}">
    <link href="/assets/libs/font-awesome-4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
    <link href="/assets/libs/material-design-webfont/css/material-design-icons-min.css" rel="stylesheet">
    <script th:inline="javascript">var foxnic_cachekey=[[${cacheKey}]];</script>
    <style>
    </style>
    <link th:each="css:${theme.css}" rel="stylesheet" th:href="${css}+'?'+${cacheKey}">
</head>

<body style="overflow-y: hidden">

<div class="layui-card">

    <div class="layui-card-body" style="">

        <div class="search-bar" style="">

            <div class="search-input-rows" style="opacity: 0">
                <!-- 搜索输入区域 -->
                <div class="layui-form toolbar search-inputs">
                    <!-- 主键 , id ,typeName=text_input, isHideInSearch=true -->
                    <!-- 单据名称 , name ,typeName=text_input, isHideInSearch=true -->
                    <!-- 流程状态 , status ,typeName=select_box, isHideInSearch=false -->
                    <div class="search-unit">
                        <div class="search-label-div" style="width:100px"><span th:text="${lang.translate('流程状态')}" class="search-label status-label">流程状态</span><span class="search-colon">:</span></div>
                        <div id="status" th:data="${enum.toArray('com.dt.platform.constants.enums.common.FlowProcessStatusEnum')}" style="width:180px" extraParam="{}"></div>
                    </div>
                    <!-- 开票金额 , amount ,typeName=number_input, isHideInSearch=true -->
                    <!-- 开票抬头 , invoiceHeader ,typeName=text_input, isHideInSearch=true -->
                    <!-- 开户银行 , bankName ,typeName=text_input, isHideInSearch=true -->
                    <!-- 银行账户 , bankAccount ,typeName=text_input, isHideInSearch=true -->
                    <!-- 银行网点 , bankAddress ,typeName=text_input, isHideInSearch=true -->
                    <!-- 电话号码 , phone ,typeName=text_input, isHideInSearch=true -->
                    <!-- 关联合同 , contractId ,typeName=select_box, isHideInSearch=true -->
                    <!-- 关联项目 , projectId ,typeName=select_box, isHideInSearch=true -->
                    <!-- 附件 , fileIds ,typeName=upload, isHideInSearch=true -->
                    <!-- 备注 , notes ,typeName=text_area, isHideInSearch=true -->
                    <!-- 申请人员 , originatorId ,typeName=button, isHideInSearch=true -->
                    <!-- 开票状态 , invoicingStatus ,typeName=radio_box, isHideInSearch=true -->
                    <!-- 开票时间 , invoicingTime ,typeName=date_input, isHideInSearch=true -->
                    <!-- 开票人员 , invoicingUserId ,typeName=button, isHideInSearch=true -->
                    <!-- 开票备注 , invoicingNotes ,typeName=text_input, isHideInSearch=true -->
                    <!-- 回款金额 , collectAmount ,typeName=number_input, isHideInSearch=true -->
                    <!-- 修改人ID , updateBy ,typeName=text_input, isHideInSearch=true -->
                    <!-- 开票类型 , type ,typeName=select_box, isHideInSearch=false -->
                    <div class="search-unit">
                        <div class="search-label-div" style="width:100px"><span th:text="${lang.translate('开票类型')}" class="search-label type-label">开票类型</span><span class="search-colon">:</span></div>
                        <div id="type" th:data="${'/service-system/sys-dict-item/query-paged-list?dictCode=cont_invoice_type'}" style="width:180px" extraParam="{}"></div>
                    </div>
                    <!-- 抬头类型 , invoiceHeaderType ,typeName=radio_box, isHideInSearch=false -->
                    <div class="search-unit">
                        <div class="search-label-div" style="width:100px"><span th:text="${lang.translate('抬头类型')}" class="search-label invoiceHeaderType-label">抬头类型</span><span class="search-colon">:</span></div>


                        <div id="invoiceHeaderType" th:data="${enum.toArray('com.dt.platform.constants.enums.oa.InvoiceHeaderTypeEnum')}" style="width:180px"></div>
                    </div>
                    <!-- 单据编号 , businessCode ,typeName=text_input, isHideInSearch=false -->
                    <div class="search-unit">
                        <div class="search-label-div" style="width:100px"><span th:text="${lang.translate('单据编号')}" class="search-label businessCode-label">单据编号</span><span class="search-colon">:</span></div>
                        <input id="businessCode" class="layui-input search-input" style="width: 180px" type="text" />
                    </div>


                </div>
                <!-- 搜索输入区域 -->
                <div class="layui-form toolbar search-inputs">
                    <!-- 开票主体 , subject ,typeName=select_box, isHideInSearch=false -->
                    <div class="search-unit">
                        <div class="search-label-div" style="width:100px"><span th:text="${lang.translate('开票主体')}" class="search-label subject-label">开票主体</span><span class="search-colon">:</span></div>
                        <div id="subject" th:data="${'/service-oa/oa-fin-company-subject/query-paged-list'}" style="width:180px" extraParam="{}"></div>
                    </div>
                    <!-- 回款状态 , collectStatus ,typeName=radio_box, isHideInSearch=false -->
                    <div class="search-unit">
                        <div class="search-label-div" style="width:100px"><span th:text="${lang.translate('回款状态')}" class="search-label collectStatus-label">回款状态</span><span class="search-colon">:</span></div>


                        <div id="collectStatus" th:data="${enum.toArray('com.dt.platform.constants.enums.oa.FinCollectStatusEnum')}" style="width:180px"></div>
                    </div>
                    <!-- 纳税人识别号 , identificationCode ,typeName=text_input, isHideInSearch=false -->
                    <div class="search-unit">
                        <div class="search-label-div" style="width:100px"><span th:text="${lang.translate('纳税人识别号')}" class="search-label identificationCode-label">纳税人识别号</span><span class="search-colon">:</span></div>
                        <input id="identificationCode" class="layui-input search-input" style="width: 180px" type="text" />
                    </div>
                    <!-- 发票号码 , ticketCode ,typeName=text_input, isHideInSearch=false -->
                    <div class="search-unit">
                        <div class="search-label-div" style="width:100px"><span th:text="${lang.translate('发票号码')}" class="search-label ticketCode-label">发票号码</span><span class="search-colon">:</span></div>
                        <input id="ticketCode" class="layui-input search-input" style="width: 180px" type="text" />
                    </div>


                </div>
                <!-- 搜索输入区域 -->
                <div class="layui-form toolbar search-inputs">
                    <!-- 最近回款日期 , collectLastTime ,typeName=date_input, isHideInSearch=false -->
                    <div class="search-unit">
                        <div class="search-label-div" style="width:100px"><span th:text="${lang.translate('最近回款日期')}" class="search-label collectLastTime-label">最近回款日期</span><span class="search-colon">:</span></div>
                            <input type="text" id="collectLastTime-begin" style="width: 180px" lay-verify="date" th:placeholder="${lang.translate('开始日期')}" autocomplete="off" class="layui-input search-input search-date-input"  readonly >
                            <span class="search-dash">-</span>
                            <input type="text" id="collectLastTime-end"  style="width: 180px"  lay-verify="date" th:placeholder="${lang.translate('结束日期')}" autocomplete="off" class="layui-input search-input search-date-input" readonly>
                    </div>
                    <!-- 创建时间 , createTime ,typeName=date_input, isHideInSearch=false -->
                    <div class="search-unit">
                        <div class="search-label-div" style="width:100px"><span th:text="${lang.translate('创建时间')}" class="search-label createTime-label">创建时间</span><span class="search-colon">:</span></div>
                            <input type="text" id="createTime-begin" style="width: 180px" lay-verify="date" th:placeholder="${lang.translate('开始日期')}" autocomplete="off" class="layui-input search-input search-date-input"  readonly >
                            <span class="search-dash">-</span>
                            <input type="text" id="createTime-end"  style="width: 180px"  lay-verify="date" th:placeholder="${lang.translate('结束日期')}" autocomplete="off" class="layui-input search-input search-date-input" readonly>
                    </div>


                </div>
            </div>


            <!-- 按钮区域 -->
            <div id="search-area" class="layui-form toolbar search-buttons" style="opacity: 0">
                <button id="search-button" class="layui-btn icon-btn"><i class="layui-icon">&#xe615;</i>&nbsp;&nbsp;<span th:text="${lang.translate('搜索','','cmp:table.search')}">搜索</span></button>
            </div>
        </div>

        <div id="table-area" style="margin-top: 126px ">
            <table class="layui-table" id="data-table" lay-filter="data-table"></table>
        </div>

    </div>
</div>

<script type="text/javascript" src="/module/global.js" th:src="'/module/global.js?'+${cacheKey}"></script>
<script type="text/javascript" src="/assets/libs/jquery-3.2.1.min.js" th:src="'/assets/libs/jquery-3.2.1.min.js?'+${cacheKey}"></script>
<script type="text/javascript" src="/assets/libs/pandyle.min.js" th:src="'/assets/libs/pandyle.min.js?'+${cacheKey}"></script>
<script type="text/javascript" src="/assets/libs/layui/layui.js" th:src="'/assets/libs/layui/layui.js?'+${cacheKey}"></script>
<script type="text/javascript" src="/assets/libs/toast/js/toast.js" th:src="'/assets/libs/toast/js/toast.js?'+${cacheKey}"></script>
<!-- 表格工具栏 -->
<script type="text/html" id="toolbarTemplate">
    <div class="layui-btn-container">
        <button th:if="${perm.checkAuth('oa_fin_invoicing_apply:create')}" id="add-button" class="layui-btn icon-btn layui-btn-sm create-new-button " lay-event="create"><i class="layui-icon">&#xe654;</i><span th:text="${lang.translate('发起审批','','cmp:table.button')}">发起审批</span></button>
    </div>
</script>

<!-- 表格操作列 -->
<script type="text/html" id="tableOperationTemplate">

    <button th:if="${perm.checkAnyAuth('oa_fin_invoicing_apply:update','oa_fin_invoicing_apply:save')}" class="layui-btn layui-btn-primary layui-btn-xs ops-edit-button " lay-event="edit"data-id="{{d.id}}"><span th:text="${lang.translate('打开','','cmp:table.ops')}">打开</span></button>


    <button th:if="${perm.checkAuth('oa_fin_invoicing_apply:delete')}" class="layui-btn layui-btn-xs layui-btn-danger ops-delete-button " lay-event="del" data-id="{{d.id}}"><span th:text="${lang.translate('废弃','','cmp:table.ops')}">废弃</span></button>

    <button class="layui-btn layui-btn-xs  collectMgr " lay-event="collect-mgr" data-id="{{d.id}}"><span th:text="${lang.translate('回款管理','','cmp:table.ops')}">回款管理</span></button>
    <button class="layui-btn layui-btn-xs  collectDtl " lay-event="collect-dtl" data-id="{{d.id}}"><span th:text="${lang.translate('回款详情','','cmp:table.ops')}">回款详情</span></button>

</script>


<script th:inline="javascript">
    var LAYUI_TABLE_WIDTH_CONFIG = [[${pageHelper.getTableColumnWidthConfig('data-table')}]];
    var SELECT_STATUS_DATA = [[${enum.toArray('com.dt.platform.constants.enums.common.FlowProcessStatusEnum')}]];
    var RADIO_INVOICEHEADERTYPE_DATA = [[${enum.toArray('com.dt.platform.constants.enums.oa.InvoiceHeaderTypeEnum')}]];
    var RADIO_INVOICINGSTATUS_DATA = [[${enum.toArray('com.dt.platform.constants.enums.oa.InvoicingStatusEnum')}]];
    var RADIO_COLLECTSTATUS_DATA = [[${enum.toArray('com.dt.platform.constants.enums.oa.FinCollectStatusEnum')}]];
    var AUTH_PREFIX="oa_fin_invoicing_apply";

    // pageType
    var PAGE_TYPE = [[${pageType}]] ;

</script>

<script th:src="'/business/oa/fin_invoicing_apply/fin_invoicing_apply_ext.js?'+${cacheKey}"></script>
<script th:src="'/business/oa/fin_invoicing_apply/fin_invoicing_apply_list.js?'+${cacheKey}"></script>

</body>
</html>